<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<!doctype html>
<html>

<head>
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>会员登录</title>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css"
        type="text/css"/>
  <script src="${pageContext.request.contextPath}/js/jquery-2.1.4.min.js"
          type="text/javascript"></script>
  <script src="${pageContext.request.contextPath}/js/bootstrap-3.1.1.min.js"
          type="text/javascript"></script>
  <!-- 引入自定义css文件 style.css -->
  <link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" type="text/css"/>

  <style>
    body {
      margin-top: 20px;
      margin: 0 auto;
      width: 100%;
    }

    .carousel-inner .item img {
      width: 100%;
      height: 300px;
    }
  </style>
</head>

<body>

<jsp:include page="head.jsp"/>


<div class="row" style="width:1210px;margin:0 auto;">

  <c:forEach items="${pagemodel.list}" var="item">
    <div class="col-md-2">
      <a href="${pageContext.request.contextPath}/product/displaymsg.do?pid=${item.pid}">
        <img src="${pageContext.request.contextPath}/${item.image}" width="170" height="170"
             style="display: inline-block;">
      </a>
      <p><a href="${pageContext.request.contextPath}/product/displaymsg.do?pid=${item.pid}"
            style='color:green'>${fn:substring(item.name,0 ,12 )}...</a></p>
      <p><font color="#FF0000">商城价：&yen;${item.shopPrice}</font></p>
    </div>
  </c:forEach>

</div>

<!--分页 -->
<div style="width:380px;margin:0 auto;margin-top:50px;">
  <ul class="pagination" style="text-align:center; margin-top:10px;">
    <c:if test="${pagemodel != null}">
      <li>
        <a href="${pageContext.request.contextPath}/product/fuzzysearch.do?fuzzy=${fuzzy}&pageid=${pagemodel.prePage}"
           aria-label="Previous"><span
                aria-hidden="true">&laquo;</span></a>
      </li>
      <c:forEach begin="${pagemodel.navigateFirstPage}" end="${pagemodel.navigateLastPage}" var="i">
        <c:if test="${pagemodel.page != i}">
          <li>
            <a href="${pageContext.request.contextPath}/product/fuzzysearch.do?fuzzy=${fuzzy}&pageid=${i}">${i}</a>
          </li>
        </c:if>
        <c:if test="${pagemodel.page == i}">
          <li class="active">
            <a href="${pageContext.request.contextPath}/product/fuzzysearch.do?fuzzy=${fuzzy}&pageid=${i}">${i}</a>
          </li>
        </c:if>
      </c:forEach>
      <li>
        <a href="${pageContext.request.contextPath}/product/fuzzysearch.do?fuzzy=${fuzzy}&pageid=${pagemodel.nextPage}"
           aria-label="Next">
          <span aria-hidden="true">&raquo;</span>
        </a>
      </li>
    </c:if>


  </ul>
</div>
<!-- 分页结束=======================        -->

<jsp:include page="history.jsp"/>
<jsp:include page="foot.jsp"/>

</body>

</html>